<template>
    <div class="app-container">
        <standard-template-base-info :detail-info="detailInfo" :view-type="2"></standard-template-base-info>

        <contract-promise-info :form="detailInfo"></contract-promise-info>

        <contract-content-info :detail-info="detailInfo"></contract-content-info>
    </div>
</template>

<script>
import ContractPromiseInfo from "@/views/contractTemplate/components/standardTemplate/ContractPromiseInfo.vue";
import StandardTemplateBaseInfo from "@/views/contractTemplate/components/standardTemplate/StandardTemplateBaseInfo.vue";
import ContractContentInfo from "@/views/contractTemplate/components/standardTemplate/ContractContentInfo.vue";

export default {
    components: {ContractContentInfo, StandardTemplateBaseInfo, ContractPromiseInfo},
    props:{
        value: {
            default: {},
        },
        state: {
            default: "readonly",
        },
    },
    computed:{
        detailInfo:{
            get(){
                console.log('工作流待办详情-------',this.value)
                if (this.value.earlyReturnRules && this.value.earlyReturnRules.length > 0) {
                    this.value.earlyReturnRules = this.value.earlyReturnRules.map(item => {
                        this.$set(item, 'leaseTerm', [item.minLeaseTerm, item.maxLeaseTerm])
                        return item
                    })
                }

                return this.value;
            }
        }
    },
    methods: {
    },
    mounted() {

    },

}
</script>

<style lang="scss" scoped>

</style>
